nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound
TechnologiesCoding ProblemsBookmarksLearning Paths
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

TOPIC OVERVIEW

react/Function Components

Plain functions that became React's primary way to build components.

10 QuestionsIntermediateHigh Priority ~10 min read

Function components are simpler by construction — no this, no constructor, no binding gymnastics. Before Hooks (React 16.8), they were limited to purely presentational, 'stateless' components, since there was no way for a plain function to hold state across renders or hook into lifecycle events. Hooks removed that limitation entirely, which is why function components are now the default.

One subtlety worth understanding deeply: each render of a function component is its own independent closure, capturing its own snapshot of that render's props and state. This is the root of the 'stale closure' bug — an event handler or effect defined in one render can end up referencing an outdated variable from that render's closure if it's still around when a later render happens, rather than automatically seeing the latest value the way a class component's this.state always would.

What you'll walk away knowing

Why function components have no this, and why that removed a whole class of binding bugs
What 'stale closure' means, and why it's a function-component-specific class of bug
How each render creates its own closure with its own snapshot of props and state
Why function components became the default once Hooks gave them state and lifecycle access
1How does React's reconciliation algorithm (Fiber) treat function components differently from class components?Intermediate
All Topics
1
Basics
JSX
State and Props
Components
Function Components
2
Virtual DOM
Reconciliation
Class Components
Lifecycle functions
3
Hooks
useState
useReducer
useMemo
useContext
useCallback
useEffect
Custom Hooks
New Hooks
4
Code Sharing
HOC
Refs
Data Sharing
Events
Context API
5
Redux
Router
CSR-SSR
React APIs
ReactDOM
Strict Mode
6
Performance Optimisation
Security
Sharethis topic

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.